﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Web.Model.User>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Login
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<%=Html.CSS("openid")%>
<%=Html.Script("jquery-1.2.6.min.js")%>
<%=Html.Script("openid-jquery.js")%>
<script>
    $(document).ready(function() {
        openid.init('openid_identifier');
    });
</script>
<div id="login">
	<div class="container">
		<div>
		    <h2 class="alt">Login</h1>
		</div>
		<div class="column span-12 colborder bpad-36" style="height:460px">
			<!-- Simple OpenID Selector -->
			<%using(Html.BeginForm("authenticate","session",FormMethod.Post,new{id="openid_form"})){ %>
				<input type="hidden" name="action" value="verify" />
		        <div id="openid_choice">
			        <h4>Choose your <a href="http://openid.net/what/">OpenID</a> Provider:</h4>
			        <div id="openid_btns"></div>
		        </div>
    			
		        <div id="openid_input_area">
			        <input id="openid_identifier" name="openid_identifier" type="text" value="http://" />
			        <input id="openid_submit" type="submit" value="Sign-In"/>
		        </div>
			<%} %>
		</div>		
		<div class="column span-8 bpad-36 prepend-1">
		    <h4>Or kick it old skool</h4>
	        <%using (Html.BeginForm()) { %>
	            <%=Html.AntiForgeryToken() %>
	            <p>
	                <label>Login</label><br />
	                <%=Html.TextBox("UserName") %>
	            </p>
	            <p>
	                <label>Password</label><br />
	                <%=Html.Password("Password") %>
	            </p>
	            <p>
                    <button class="button positive" type="submit"> 
                      <img alt="" src="/public/css/plugins/buttons/icons/tick.png" /> 
                      Login
                    </button> 
	            </p>
	        <%} %>
            <hr />
            <h4>No account?</h4>
            <%using (Html.BeginForm("register","session")) { %>
	            <%=Html.AntiForgeryToken() %>
	            <p>
	                <label>User Name</label><br />
	                <%=Html.TextBox("UserName") %>
	            </p>
	            <p>
	                <label>Password</label><br />
	                <%=Html.Password("Password") %>
	            </p>
                <p>
	                <label>Confirm</label><br />
	                <%=Html.Password("Confirm")%>
	            </p>
	            <p>
                    <button class="button positive" type="submit"> 
                      <img alt="" src="/public/css/plugins/buttons/icons/tick.png" /> 
                      Sign up
                    </button> 
	            </p>
	        <%} %>
	    </div>

	</div>
</div>
</asp:Content>
